// Defines a multiplicationquestion
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.chalmers.se.tda367.question;

/**
 *
 * @author Hanna
 */
public class MultiplicationMathQuestion extends MathQuestion {

    public MultiplicationMathQuestion(int maxX, int maxY) {  // the parameters are the maximum values that an be assigned to x and y
        int x = 1 + (int) (maxX * Math.random()); // randomizes the x-value
        int y = 1 + (int) (maxY * Math.random()); // randomizes the y-value
        answer = x * y;
        question = x + " * " + y;
    }
}
